package com.example.springcloud.domain;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 种草文章评论对象 comments
 * 
 * @author hx
 * @date 2025-02-18
 */
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "种草文章评论对象")
@Data
public class Comments implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 评论ID */
    @ApiModelProperty(value = "评论ID")
    private Long id;

    /** 关联种草文章ID */
    @Excel(name = "关联种草文章ID")
    @ApiModelProperty(value = "关联种草文章ID")
    private Long postId;

    /** 评论用户ID */
    @Excel(name = "评论用户ID")
    @ApiModelProperty(value = "评论用户ID")
    private Long userId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    @ApiModelProperty(value = "评论内容")
    private String content;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "评论时间")
    private Date createdAt;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("postId", getPostId())
            .append("userId", getUserId())
            .append("content", getContent())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
